<template name="data_table">
<h1>
        {{modelname}}管理
        <small>{{modelname}}管理</small>
        </h1>
<div class="container table-responsive">

<link href="/assets/adminlte/plugins/iCheck/flat/red.css" rel="stylesheet">
<link href="/assets/css/bootstrap-toggle.min.css"  rel="stylesheet">
<table class="table table-hover table-striped table-condensed">
      <caption>
      <div class="btn-group">
      {{#if canCreate modelname}}
          <button class="btn btn-medium btn-info" id="new-model-btn" data-toggle="modal" data-target="#new-modal">新建{{modelname}}</button>
          <button type="button" class="delete-checked btn btn-medium btn-danger">删除所选</button>
      {{else}}

          <button type="button" class="ban-checked btn btn-medium btn-danger">禁用所选</button>
      {{/if}}
          
      </div>


      </caption>
      <thead>
        <tr>
          <th id="check-all">
          <label>
      		<input type="checkbox" class="check-all check-cust"> 全选
    		</label>
    	  </th>
    	  {{#each head in tableheads}}
          <th>{{head}}</th>
		  {{/each}}
          <th>操作</th>

        </tr>
      </thead>
      <tbody>
      {{#if subsReady subreadyName }}
        <tr><td><p>已经载入了</p></td></tr>
      {{/if}}
       {{#if isEmpty }}
          <tr><td><p>没有纪录啦</p></td></tr>
        {{ else }}
        {{#each record in records}}
          {{#if isVisible record}}
           {{> data_record record=record}}
           {{ else }}
           {{/if}}
        {{/each}}

        {{/if}}

      </tbody>

    </table>
     {{> Admin_pagination page=pageNumber}}
</div>
</template>
